home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2002 January / PC Answers January 2002.7z / PC Answers January 2002.bin / graphics / freepixl / _SETUP.1 / Files.pxl < prev    next >
Text File  |  1998-10-21  |  2KB  |  86 lines

  1. {-----------------------------------------------------------------------
  2.     Filename    : files.pxl
  3.     Purpose    : access ini files
  4.     Date        : v1.0 24 jan 96
  5.     Author        : S.Dibbs, VYSOR Integration Inc
  6.  
  7. ------------------------------------------------------------------------}
  8.  
  9. Initialize:
  10. { Get the screen parameters and adjust the main window for a fixed size. }
  11.  
  12.     NewCaption$ = "Split filenames"
  13.     UseCoordinates(PIXEL)    
  14.     WinGetActive(OldCaption$)
  15.     WinTitle(OldCaption$,NewCaption$) 
  16.     WinLocate(NewCaption$,0,0,1023,120, Res)
  17.     WinShow(NewCaption$,NOTOPMOST,Res)  
  18.     DirGet(SourceDir$)
  19.     
  20.     InfoMenu(REMOVE)
  21.     WaitInput(1)
  22.     SetMenu("Exit!",Run_Leave,
  23.         ENDPOPUP,
  24.         "Split Name",Split_name,
  25.         ENDPOPUP,
  26.         "Test WinShow",TestWinShow,
  27.         ENDPOPUP)
  28.  
  29.     SetKeyboard(112,Trap_F1)
  30.  
  31.  
  32.  
  33. Wait_for_input:
  34.     WaitInput()
  35.  
  36. Trap_F1:
  37.     MessageBox(OK,1,ICON01,"Trapped F1 key","DEBUG",Res)
  38.  
  39.     Goto Wait_for_input
  40.  
  41. TestWinShow:
  42.     WinShow(NewCaption$,MINIMIZE,Res)
  43.     WaitInput(800)
  44.     WinShow(NewCaption$,RESTORE,Res)
  45.     WaitInput(800)
  46.     WinShow(NewCaption$,MAXIMIZE,Res)
  47.     WaitInput(800)
  48.     WinShow(NewCaption$,NORMAL,Res)
  49.     WaitInput(800)
  50.     WinShow(NewCaption$,RESTORE,Res)
  51.  
  52.     Goto Wait_for_input
  53.  
  54. Split_name:
  55.     DirGet(SourceDir$)
  56.     Filter$ = "All Files(*.*),*.*"
  57.     InitFile$ = "*.*"
  58.     InitDir$ = SourceDir$
  59.     Caption$ = "Select any file"
  60.     FileGet(Filter$, InitFile$, InitDir$, Caption$,
  61.         CHANGEDIR_EXIST,FileName$)
  62.     If FileName$ = "" Then End
  63.  
  64.     TextBox("modify",Caption$,FileName$,Btn)
  65.     Path$ = ""
  66.     RootName$ = ""
  67.     Extension$ = ""
  68.  
  69.           FilePath(FileName$,Path$,Rsl) 
  70.     FileName(FileName$,RootName$,Res)
  71.     FileExtension(FileName$,Extension$,Rsl)
  72.     
  73.     Split$ = Path$ + " "
  74.     Split$ = Split$ + RootName$
  75.     Split$ = Split$ + " "
  76.     Split$ = Split$ + Extension$
  77.     
  78.     Label$ = "Split " + FileName$
  79.     Res$ = RootName$
  80.     ListBox(Label$,Split$," ",Res$)
  81.  
  82.     Goto Wait_for_input
  83.  
  84. Run_Leave:
  85.     End
  86.